package com.xiaohong.oauth.config;

import io.swagger.v3.oas.models.Components;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.info.License;
import io.swagger.v3.oas.models.security.SecurityScheme;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Swagger配置
 */
@Configuration
public class SwaggerConfig {
    @Bean
    public OpenAPI springShopOpenAPI(@Value("${springdoc.version}") String appVersion) {
        return new OpenAPI()
                .info(new Info().title("鉴权微服务接口文档")
                        .description("这是接口文档描述,下面是服务条款地址，最下面是许可证地址,你可以点[这里](http://www.xiaohong.work)进官网")
                        .termsOfService("http://swagger.io/terms/")
                        .version(appVersion)
                        .license(new License().name("小鸿").url("http://www.xiaohong.work")));
    }




}
